$(".submit_btn").click(function() {
    var item = null;
    var obj = document.getElementsByName("ide")
    for (var i = 0; i < obj.length; i++) { //遍历Radio 
        if (obj[i].checked) {
            item = obj[i].value;
        }
        console.log(item);
    }
    var telephone = $("#registration_phone").val();
    console.log(telephone);
    var password = $("#passWord").val();
    console.log(password);
    var user_name = $("#mininame").val();
    console.log(user_name);
    var true_name = $("#fullname").val();
    console.log(true_name);

    // 用户注册
    /*var urlone = "/userregister";
    $.ajax({
        url: urlone,
        type: "POST",
        dataType: "json",
        data: {
            userDTO: {
                id: "id",
                telephone: telephone,
                password: password,
                user_name: user_name,
                true_name: true_name,
                item: item,
            }

        },
        success: function (res)  {
            console.log(res);
        },
        error: function (err)  {
            console.log(err);
        },
    });*/
    // 用户注册
    var urltwo = "/courierregister";
    $.ajax({
        url: urltwo,
        type: "POST",
        dataType: "json",
        data: {
            userDTO: {
                id: "id",
                telephone: telephone,
                password: password,
                user_name: user_name,
                true_name: true_name,
                item: item,
            }

        },
        success: function (res)  {
            console.log(res);
        },
        error: function (err)  {
            console.log(err);
        },
    });
   /* localStorage.setItem(registrationPhone, telephone);
    localStorage.setItem(thisPassWord, password);*/

    window.location.href = "/login";
});
$(".cancel").click(function() {
    window.location.href = "index";
})